package com.example.itcacp.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 收藏实体类
 * */

@Data
@TableName("pc_collection")
public class Collect {
    @TableId(type = IdType.AUTO)
    private Long collectionId;
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    private Long targetId;
    private Like.ContentType targetType; // 目标内容类型
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime created_at; // 收藏时间
}
